home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / GRAPHICS / TEXTVEC.ZIP / TEXTRIX.ASM < prev    next >
Encoding:
Assembly Source File  |  1995-03-26  |  1.2 KB  |  76 lines

  1. .Model Large,Pascal
  2. .Code
  3. .386
  4.  
  5. Charset  db 8192 dup(?)    ;; the character set to use
  6.  
  7.  
  8.  
  9. Public SetCharSet
  10.  
  11. Proc SetCharSet   ;; Sets the New character set
  12.   Mov  dx,$03c4
  13.   Mov  ax,$0402;
  14.   Out  dx,ax 
  15.   Mov  ax,$0704;
  16.   Out  dx,ax 
  17.   Mov  dx,$03ce
  18.   Mov  ax,$0204;
  19.   Out  dx,ax
  20.   Mov  ax,$0005;
  21.   Out  dx,ax
  22.   Mov  ax,$0006;
  23.   Out  dx,ax
  24.  
  25.   Push ds
  26.   Mov  ax,cs
  27.   Mov  ds,cs
  28.   Mov  si,Offset CharSet
  29.   Mov  ax,$A000
  30.   Mov  es,ax
  31.   Mov  dx,0
  32.  
  33.  @Looper1:
  34.   Mov  di,dx
  35.   Shl  di,5
  36.   Add  di,0a000h   ;; Add offset of charset #6
  37.   Mov  cx,4
  38.   db 66h; Rep  Movsw   { Rep Movsd }
  39.   Inc  dx
  40.   Cmp  dx,256
  41.   Jnz  @Looper1
  42.  
  43.   Mov  dx,0   ; Do next 256 characters
  44.  @Looper2:
  45.   Mov  di,dx
  46.   Shl  di,5
  47.   Add  di,0e000h   ;; Add offset of charset #6
  48.   Mov  cx,4
  49.   db 66h; Rep  Movsw   { Rep Movsd }
  50.   Inc  dx
  51.   Cmp  dx,256
  52.   Jnz  @Looper2
  53.  
  54.   Mov  dx,$03c4
  55.   Mov  ax,$0302;
  56.   Out  dx,ax
  57.   Mov  ax,$0304;
  58.   Out  dx,ax
  59.   Mov  dx,$03ce
  60.   Mov  ax,$0004;
  61.   Out  dx,ax
  62.   Mov  ax,$1005;
  63.   Out  dx,ax
  64.   Mov  ax,$0e06;
  65.   Out  dx,ax
  66.  
  67.   Ret
  68. EndP SetCharSet
  69.  
  70. Public PutPixel
  71.  
  72. Proc PutPixel Uses es di,X:Word,Y:Word
  73.  
  74.   Ret
  75. EndP PutPixel
  76.